package com.weicx.wuzhiops.service;

import com.weicx.wuzhiops.entity.RepairRecord;
import com.weicx.wuzhiops.model.request.RepairRecordRequest;
import com.weicx.wuzhiops.model.wrapper.DataGrid;
import com.weicx.wuzhiops.vo.RepairRecordVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 设备报修日志表 服务类
 * </p>
 *
 * @author caoshi
 * @since 2022-12-13
 */
public interface RepairRecordService {


    /**
     * 新增报修记录
     * @param request
     * @return
     */
    Long addRepairRecord(RepairRecordRequest request);

    /**
     * 删除报修记录
     * @param idList
     * @return
     */
    Integer deleteRepairRecord(List<Long> idList);

    /**
     * 修改报修记录
     * @param request
     * @return
     */
    Integer updateRepairRecord(RepairRecordRequest request);


    /**
     * 查询报修记录列表
     * @param request
     * @return
     */
    DataGrid<RepairRecordVO> listRepairRecord(RepairRecordRequest request);

    /**
     * 根据id查询报修记录
     * @param id
     * @return
     */
    RepairRecordVO getRepairRecord(Long id);

    /**
     *  根据维修状态分组获取维修记录列表
     * @return
     */
    Map<Integer, List<RepairRecord>> getRecordByState();


}
